(function() {
    'use strict';

    angular
        .module('byibserverApp')
        .controller('IllnessInfoDetailController', IllnessInfoDetailController);

    IllnessInfoDetailController.$inject = ['$scope', '$rootScope', '$stateParams', 'previousState', 'DataUtils', 'entity', 'IllnessInfo', 'TypeOfCase', 'Product'];

    function IllnessInfoDetailController($scope, $rootScope, $stateParams, previousState, DataUtils, entity, IllnessInfo, TypeOfCase, Product) {
        var vm = this;

        vm.illnessInfo = entity;
        vm.previousState = previousState.name;
        vm.byteSize = DataUtils.byteSize;
        vm.openFile = DataUtils.openFile;

        var unsubscribe = $rootScope.$on('byibserverApp:illnessInfoUpdate', function(event, result) {
            vm.illnessInfo = result;
        });
        $scope.$on('$destroy', unsubscribe);
    }
})();
